package com.cdie.myschool.mapper.TeacherTermReportMapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cdie.myschool.domain.entity.TeacherOld;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.mapping.ResultSetType;
import org.apache.ibatis.session.ResultHandler;

/**
 * @author 明祺奇-199000331
 * @date 2022/10/6 - 10:46
 */
@Mapper
public interface TeacherOldMapper extends BaseMapper<TeacherOld> {
    @Select("select * from teacher_base_info")
    @Options(resultSetType = ResultSetType.FORWARD_ONLY, fetchSize = 1000)
    @ResultType(TeacherOld.class)
    @DS("slave_1")
    void getTeacherData(ResultHandler<TeacherOld> handler);
}
